package com.springtiles.util;

import java.sql.SQLException;
import java.util.List;

import org.springframework.context.support.ClassPathXmlApplicationContext;

import com.springtiles.entity.dao.MapregionsDAO;
import com.springtiles.entity.model.Mapregions;

public class MyTest {

	/**
	 * @param args
	 * @throws SQLException
	 */
	public static void main(String[] args) throws SQLException {
		ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext(
				"applicationContext.xml");
		MapregionsDAO regiondao = (MapregionsDAO) ctx
				.getBean("mapregionsDAOImpl");
		List<Mapregions> regions = regiondao.selectByExample(null);
		for (Mapregions region : regions) {
			System.out.println(region.getRegionname());
		}
	}
}
